package demo.messaging.common;

import java.io.Serializable;

public abstract class AbstractMessage implements Serializable {

	private String destination;

	/**
	 * This field is set by the server.
	 */
	private String sender = null;

	private String text;

	public AbstractMessage() {

	}

	public AbstractMessage(final String destination) {
		this.destination = destination;
	}

	public String getDestination() {
		return this.destination;
	}

	public String getSender() {
		return this.sender;
	}

	public String getText() {
		return this.text;
	}

	public void setDestination(final String destination) {
		this.destination = destination;
	}

	public void setSender(final String sender) {
		this.sender = sender;
	}

	public void setText(final String text) {
		this.text = text;
	}

	@Override
	public String toString() {
		return getClass().getName() + "_" + getSender() + "_"
				+ getDestination();
	}

}
